//package com.baitengsoft.patentapimonitor.common.utils;
//
//import org.springframework.beans.BeansException;
//import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
//import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
//
//import java.util.HashMap;
//import java.util.Map;
//import java.util.Properties;
//
///**
// * @author wangze
// * @date 2018-01-19 9:15.
// **/
//public class PropertyPlaceholder extends PropertyPlaceholderConfigurer {
//
//    private static Map<String,String> propertyMap;
//
//    @Override
//    protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props) throws BeansException {
//        super.processProperties(beanFactoryToProcess, props);
//        propertyMap = new HashMap<String, String>();
//        for (Object key : props.keySet()) {
//            String keyStr = key.toString();
//            String value = props.getProperty(keyStr);
//            propertyMap.put(keyStr, value);
//        }
//    }
//
//    //static method for accessing context properties
//    public static Object getProperty(String name) {
//        return propertyMap.get(name);
//    }
//}